<?php
namespace app\index\controller;

use think\Db;
use think\View;

class Index
{
    public function index()
    {
    	$res = Db::connect ();
    	
    	$result = Db::table ( 'sys_admin' )->where("id = 1")->find();
    	//return json($result);
    	$view = new View();
    	$view->assign("name",'tthuc');
    	$view->assign("admin",$result);
    	//return $view->fetch();
    	return view ( "index", ["userinfo" => $result ] );
    }
}
